<% layout('layout') -%><!--加载全局布局文件-->
<!--NgC div start--->

<% block('head').append('<link rel="stylesheet" href="http://cdn.staticfile.org/twitter-bootstrap/3.0.3/css/bootstrap.min.css">') %>
<% block('head').append('<link rel="stylesheet" href="'+CDN+'images/activity/sginday/calendar/css/style1.css">') %>
<div id="singday" ng-controller="CalendarDemoCtrl" ng-init="loadEvents()" ng-cloak class="ng-cloak">
    <div class="topdiv">
        <div class="am-cf">
            <div class="am-fl am-padding-sm">累计签到<span ng-bind="AllSignDays"></span>天</div>
            <div class="am-fr am-padding-sm"><a href="#" data-am-modal="{target: '#my-popup'}" ng-click="getRule()" style="color: #ffffff">签到规则</a></div>
        </div>
        <div class="sginbtndiv">
            <img src="../images/activity/sginday/9.png" ng-click="signBtn()" ng-if="SignState==0" class="singbtn animated bounceIn"/><br>
            <span ng-if="SignState==1">今日已签到</span>
        </div>
    </div>
    <div  class="am-cf" style="margin-top: -100px;color: #ffffff;">
        <div class="am-fl am-padding-sm am-margin-bottom-0 am-padding-bottom-0">当前积分:<span ng-bind="UserPoint"></span></div>
        <div class="am-fl am-padding-sm">您本轮签到周期为:<span ng-bind="firstSignDate | date : 'yyyy-MM-dd'"></span><span>&nbsp;至&nbsp;</span></span><span ng-bind="lastSignDate | date : 'yyyy-MM-dd'"></span></div>
    </div>
    <div  >
        <div class="well well-sm" style="margin-bottom:0px">
            <calendar ng-model="currentDate" calendar-mode="mode" event-source="eventSource"
                      range-changed="reloadSource(startTime, endTime)"
                      event-selected="onEventSelected(event)"
                      time-Selected="getNowTime(selectedTime)"
                      current-Month="getCurrentMonth(currentCalendarDate)"></calendar>
        </div>
    </div>
    <ul class="am-list am-list-static am-list-border" >
        <li ng-repeat="gifts in GiftArray">
            <i class="am-icon-check-square-o am-icon-fw"></i>
            {{gifts.actname}}
        </li>
    </ul>
    <!---ALERT模态框-->
    <div class="am-modal am-modal-alert modaldiv" tabindex="-1" id="my-alert">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">{{AlertTitle}}</div>
            <div class="am-modal-bd">
                {{AlertContent}}
            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn  am-round" data-am-modal-cancel>确 定</span>
            </div>
        </div>
    </div>

    <!---ALERT模态框-->
    <div class="am-modal am-modal-confirm modaldiv" tabindex="-1" id="my-confirm">
        <div class="am-modal-dialog">
            <div class="am-modal-hd">{{ConfrimTitle}}</div>
            <div class="am-modal-bd">
                {{ConfirmContent}}
            </div>
            <div class="am-modal-footer">
                <span class="am-modal-btn" data-am-modal-cancel>取消</span>
                <span class="am-modal-btn" data-am-modal-confirm>确定补签</span>
            </div>
        </div>
    </div>

    <!----签到活动规则---->
    <div class="am-popup" id="my-popup">
        <div class="am-popup-inner">
            <div class="am-popup-hd">
                <h4 class="am-popup-title">活动规则</h4>
      <span data-am-modal-close
            class="am-close">&times;</span>
            </div>
            <div class="am-popup-bd">
                <div class="am-panel am-panel-default">
                    <div class="am-panel-hd">
                        <h3 class="am-panel-title">签到规则</h3>
                    </div>

                        1、累计天数到达后，奖品将自动发放，无需领取，奖品信息将显示在日历下方；<br>
                        2、所有签到奖品仅限本人领取，不可转让；<br>
                        3、电子现金券和满减券会直接放入会员账号 “我的现金券”中；<br>
                        4、电子现金券和满减券的使用有效期为发放后的7天，逾期作废；<br>
                        5、现金奖将以余额形式充值到会员卡余额中；<br>
                        6、实物奖品将直接放入您的购物车中，点击结算即可；<br>
                        7、实物奖品需在发放当天24:00前结算，逾期无效；<br>
                        8、实物奖品将在结算后的5个工作日内配送；<br>
                        9、本活动限货到付款地区；<br>
                        10、新的签到规则自2015年11月9日生效，原签到规则自动作废，按照原签到规则已领取过奖品的用户不可再享受新签到中之前相应天数的奖品；<br>
                        11、签到规则以本页面显示为准，果然100拥有对本活动的最终解释权。<br>

                </div>


                <div class="am-panel am-panel-default">
                    <div class="am-panel-hd">
                        <h3 class="am-panel-title">签到奖励</h3>
                    </div>
                    <table class="am-table">
                        <tr ng-repeat="signDay in sign">
                            <td>{{signDay['actname']}}</td>
                        </tr>
                    </table>
                </div>

                <div class="am-panel am-panel-default">
                    <div class="am-panel-hd">
                        <h3 class="am-panel-title">补签所需积分</h3>
                    </div>
                    <table class="am-table">
                        <tr ng-repeat="supply in supplys">
                            <td>{{supply['begin_day']}}天~{{supply['end_day']}}天</td><td>{{supply['points']}}积分</td>
                        </tr>
                    </table>
                </div>
                <br>

            </div>
        </div>
    </div>
</div>
<!--NgC div end--->
<!---启用底部navbar-->
<!--<% include ../navbar.ejs %>-->
<!--如果本页面有额外的js文件/代码需要加入到head中 使用如下代码-->

<% block('footer').append('<script src="'+CDN+'script/signday.js"></script>') %>
<% block('footer').append('<script src="'+CDN+'images/activity/sginday/calendar/js/moment.mini.js"></script>') %>

